/**
 * <p>文件名:		FooWorkJobImpl.java</p>
 * <p>版权:		CopyrightTag</p>
 * <p>公司:		千方集团CTFO</p>
 * @author		周华彬(zhouhuabin@ctfo.com, zhou_hua_bin@163.com)
 */

package com.caits.lbs.framework.services.job;

import org.apache.log4j.Logger;

import com.caits.lbs.exception.LBSException;
import com.caits.lbs.framework.log.CommonLogFactory;

/**
 * <p>
 * FooWorkJobImpl
 * </p>
 * <p>
 * 用途：简单定期任务实现类
 * </p>
 * 
 * @author 周华彬(zhouhuabin@ctfo.com, zhou_hua_bin@163.com)
 * @version 0.0.1 2012-7-11
 *          <table style="border:1px solid gray;">
 *          <tr>
 *          <th width="100px">版本号</th>
 *          <th width="100px">动作</th>
 *          <th width="100px">修改人</th>
 *          <th width="100px">修改时间</th>
 *          </tr>
 *          <!-- 以 Table 方式书写修改历史 -->
 *          <tr>
 *          <td>0.0.0</td>
 *          <td>创建类</td>
 *          <td>zhb</td>
 *          <td>2012-7-11 上午10:43:51</td>
 *          </tr>
 *          <tr>
 *          <td>0.0.1</td>
 *          <td>创建类</td>
 *          <td>zhb</td>
 *          <td>2012-7-11 上午10:43:51</td>
 *          <td>0.0.2</td>
 *          <td>修改类</td>
 *          <td>xxx</td>
 *          <td>x年x月x日</td>
 *          </tr>
 *          </table>
 */
public class FooWorkJobImpl implements IWorkJob {

	private Logger log = CommonLogFactory.getLog();
	
	private String foo;
	/*
	 * (non-Javadoc)
	 * 
	 * @see com.caits.lbs.framework.services.jmx.ILogSetable#setLevel(int)
	 */
	@Override
	public String setLevel(int level) {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.caits.lbs.framework.services.job.IWorkJob#init()
	 */
	@Override
	public void init() throws LBSException {
		log.info(getClass().getName()+" inited.foo="+getFoo());

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.caits.lbs.framework.services.job.IWorkJob#doWork()
	 */
	@Override
	public boolean doWork() throws LBSException {
		log.info(getClass().getName()+" doWork over.");
		return false;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.caits.lbs.framework.services.job.IWorkJob#destroy()
	 */
	@Override
	public void destroy() throws LBSException {
		log.info(getClass().getName()+" destroy over.");
	}

	/**
	 * 获取变量<code>foo</code>的值
	 * @return 返回的数据类型是<code>String</code>
	 */
	public String getFoo() {
		return foo;
	}

	/**
	 * 设置变量<code> foo</code> 的值
	 * @param foo  <code>foo</code> 参数类型是<code>String</code>
	 */
	public void setFoo(String foo) {
		this.foo = foo;
	}

}
